package com.dayatang.android.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;

import com.dayatang.android.config.Config;

public class InitActivity extends BaseActivity {
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.init_activity);
        if (isSaveServerAddress()) {
        	new CountDownTimer(300,100) {
     			public void onTick(long arg0) {}
     			public void onFinish() {
     				toNextActivity();
     			}
     		}.start();
        } else {
        	 new CountDownTimer(3000,100) {
     			public void onTick(long arg0) {}
     			public void onFinish() {
     				toNextActivity();
     			}
     		}.start();
        }
        
    }
    
    private void toNextActivity() {
		Intent intent = new Intent(InitActivity.this, ServerInitActivity.class);
		intent.putExtra(Config.WHERE, Config.INIT);
		startActivity(intent);
		finish();
    }
    
}
